package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectDangerEntityMapper;
import com.ly.heart.domain.ProjectDangerEntity;
import com.ly.heart.service.IProjectDangerEntityService;

/**
 * 危大工程专项施工方案审批记录Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectDangerEntityServiceImpl implements IProjectDangerEntityService
{
    @Autowired
    private ProjectDangerEntityMapper projectDangerEntityMapper;

    /**
     * 查询危大工程专项施工方案审批记录
     *
     * @param id 危大工程专项施工方案审批记录主键
     * @return 危大工程专项施工方案审批记录
     */
    @Override
    public ProjectDangerEntity selectProjectDangerEntityById(String id)
    {
        return projectDangerEntityMapper.selectProjectDangerEntityById(id);
    }

    /**
     * 查询危大工程专项施工方案审批记录列表
     *
     * @param projectDangerEntity 危大工程专项施工方案审批记录
     * @return 危大工程专项施工方案审批记录
     */
    @Override
    public List<ProjectDangerEntity> selectProjectDangerEntityList(ProjectDangerEntity projectDangerEntity)
    {
        return projectDangerEntityMapper.selectProjectDangerEntityList(projectDangerEntity);
    }

    /**
     * 新增危大工程专项施工方案审批记录
     *
     * @param projectDangerEntity 危大工程专项施工方案审批记录
     * @return 结果
     */
    @Override
    public int insertProjectDangerEntity(ProjectDangerEntity projectDangerEntity)
    {
        projectDangerEntity.setCreateTime(DateUtils.getNowDate());
        return projectDangerEntityMapper.insertProjectDangerEntity(projectDangerEntity);
    }

    /**
     * 修改危大工程专项施工方案审批记录
     *
     * @param projectDangerEntity 危大工程专项施工方案审批记录
     * @return 结果
     */
    @Override
    public int updateProjectDangerEntity(ProjectDangerEntity projectDangerEntity)
    {
        return projectDangerEntityMapper.updateProjectDangerEntity(projectDangerEntity);
    }

    /**
     * 批量删除危大工程专项施工方案审批记录
     *
     * @param ids 需要删除的危大工程专项施工方案审批记录主键
     * @return 结果
     */
    @Override
    public int deleteProjectDangerEntityByIds(String[] ids)
    {
        return projectDangerEntityMapper.deleteProjectDangerEntityByIds(ids);
    }

    /**
     * 删除危大工程专项施工方案审批记录信息
     *
     * @param id 危大工程专项施工方案审批记录主键
     * @return 结果
     */
    @Override
    public int deleteProjectDangerEntityById(String id)
    {
        return projectDangerEntityMapper.deleteProjectDangerEntityById(id);
    }
}
